package com.yanqu.road.entity.monopolymarket;

import com.yanqu.road.entity.enums.eMonopolyMarketResType;
import com.yanqu.road.entity.monopolymarket.fortress.MonopolyMarketFortress;
import com.yanqu.road.entity.monopolymarket.group.MonopolyMarketCrossGroup;
import com.yanqu.road.entity.monopolymarket.office.MonopolyMarketOffice;
import com.yanqu.road.entity.monopolymarket.resgrab.MonopolyMarketResGrab;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Description 榷场数据
 * @Author cwq
 * @Data 2021/8/11 18:06
 */
public class MonopolyMarket {
    /**
     * 分组信息 有可能为空
     */
    public MonopolyMarketCrossGroup group;

    /**
     * 榷署数据
     */
    public MonopolyMarketOffice monopolyMarketOffice;

    /**
     * 资源争夺战 type 2王帐 3王宫
     */
    public Map<Integer, MonopolyMarketResGrab> monopolyMarketResGrab = new ConcurrentHashMap<>(2);

    /**
     * 要塞
     */
    public MonopolyMarketFortress monopolyMarketFortress;

    /**
     * 公告 分组变动清空 k:类型
     */
    public Map<Integer, List<MonopolyMarketNoticeData>> noticeMap = new ConcurrentHashMap(3);

    /**
     * 需要入库的 公告
     */
    public List<MonopolyMarketNoticeData> needAddNoticeList = new ArrayList<>();

    public MonopolyMarket(MonopolyMarketCrossGroup group) {
        this();
        this.group = group;
    }

    public MonopolyMarket(){
        this.monopolyMarketOffice = new MonopolyMarketOffice();
        this.monopolyMarketResGrab.put(eMonopolyMarketResType.RES_KING.getValue(),new MonopolyMarketResGrab(eMonopolyMarketResType.RES_KING.getValue()));
        this.monopolyMarketResGrab.put(eMonopolyMarketResType.RES_QUEEN.getValue(),new MonopolyMarketResGrab(eMonopolyMarketResType.RES_QUEEN.getValue()));
        this.monopolyMarketFortress = new MonopolyMarketFortress();
    }

}
